package fr.vod.ihm.adapter;


import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.MediaController;
import fr.vod.demo.videoshareUcp.R;

public class VideoController extends MediaController {
	private Context mContext;
	public Button fullScreenButton;
	
	public VideoController(Context context) {
	    super(context);
	    
	    this.mContext=context;	
	    fullScreenButton = new Button(mContext);
	}
	
	@Override 
	 public void setAnchorView(View view) {
	     super.setAnchorView(view);
	     fullScreenButton.setBackgroundResource(R.drawable.button_full_screen);
	     FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
	     params.gravity = Gravity.RIGHT;
	     params.rightMargin = 20;
	     params.topMargin = 20;
	     params.height=40;
	     params.width=40;
	     addView(fullScreenButton, params);
	}
	
	public void hide(){
		super.show(0);
	}
	public void show(){
		super.show();
	}
	
	public void show(int timeout){
		super.show(timeout);
	}
	      
}
